package com.hxut.Controller.Utils;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import springfox.documentation.annotations.ApiIgnore;

@Data
@ApiModel(value = "响应体",description = "后端响应内容")
public class Result {
    @ApiModelProperty(value = "是否出现异常")
    private Boolean flag;
    @ApiModelProperty(value = "响应数据")
    private Object data;
    @ApiModelProperty("返回的消息")
    private String msg;

    public Result(){}
    public Result(Boolean flag){
        this.flag=flag;
    }
    public Result(Boolean flag,Object data){this.flag=flag;this.data=data;}
    public Result(Boolean flag,String msg){this.flag=flag;this.msg=msg;}
    public Result(String msg){
        this.flag=false;
        this.msg=msg;
    }


}
